package com.haiyangwang1.lesson12.ex3;

public class Test {
    public static void main(String[] args) {
        Book book1=new Book();
        book1.name="斗破苍穹";
        book1.price=100;
        Book.type="玄幻";

        Book book2=new Book();
        book2.name="斗罗大陆";
        book2.price=100;
        Book.type="科幻";
        System.out.println(book1.name+"----->"+book1.type);
        System.out.println(book2.name+"----->"+book2.type);//因为静态初始化只执行一次
        Book.bag(2);

    }
}
